home *** CD-ROM | disk | FTP | other *** search
- program help;
- var
- command:string[20];
- const
- crlf:string[2] = ^M^J;
-
- type
- text3 = string[3];
- text8 = string[8];
- text10 = string[10];
- text20 = string[20];
- text22 = string[22];
- text40 = string[40];
- text80 = string[80];
- text128 = string[128];
- text255 = string[255];
- registers = record
- AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags:integer;
- end;
- var
- filename,file1,file2 : text80;
- reg : registers;
- str1,str2 : text20;
- line40 : text40;
- line80 : text80;
- line128 : text128;
- line255 : text255;
- ch,ch1,ch2 : char;
- i,j,k,l,m,n,x,y,z : integer;
- a,b,c,d : real;
-
-
- (**********************************************************)
- (* Function GETCMD *)
- (* ------ *)
- (* calling sequence : cmd := GetCmd *)
- (* returns : next parameter from the command line. *)
- (**********************************************************)
- function GetCmd : text80;
- var
- cmdlength:byte absolute CSEG:$0080;
- cmdline:string[126] absolute CSEG:$0081;
- begin
- GetCmd := ''; ch := ' '; i := 0;
- if cmdlength>0 then (* check if no more commands *)
- begin
- while ch = ' ' do (* search cmdline for the first char *)
- begin
- i := i + 1;
- ch := cmdline[i];
- if (ch < ' ') or (ch = ',') then ch := ' ';
- if ((i >= cmdlength) and (ch = ' ')) then ch := #$00;
- end;
-
- if ch = #$00 then cmdlength := 0 else (* cont if char found *)
- begin
- if i > 1 then delete(cmdline,1,i-1);
- cmdlength := cmdlength - (i - 1);
- i := 1;
-
- while ch <> ' ' do (* find last char of this cmd *)
- begin
- i := i+1;
- ch := cmdline[i];
- if (ch < ' ') or (ch = ',') then ch := ' ';
- if i > cmdlength then ch := ' ';
- end;
-
- GetCmd := copy(cmdline,1,i-1);
- cmdlength := cmdlength - (i - 1);
- if cmdlength <> 0 then delete(cmdline,1,i-1);
- end;
- end;
- end;
-
-
- {************************************************************}
- {* Function READSECURE *}
- {* ---------- *}
- {* calling sequence : ReadSecure(instr); *}
- {* instr = string to be output to the screen *}
- {* returns : a string containing a lineinput from the kbd. *}
- {* there is no echo to the screen. *}
- {************************************************************}
- function ReadSecure(instr:text128): text128;
- begin
- write(instr);
- ch := #00; line128 := '';
- read(KBD,ch);
- while ch <> #$0D do { while no <cr> }
- begin
- i := length(line128);
- if ch <> #$08 then { backspace ? }
- insert(ch,line128,i+1) { add this char if not }
- else
- if i > 0 then delete(line128,i,1); { delete last char if so}
- if ch = #$1B then line128 := ''; { <esc> will startover }
- read(KBD,ch);
- end;
- ReadSecure := line128;
- if length(instr) > 0 then writeln; { <cr> if line output }
- end;
-
-
- begin
- writeln;
- write (' HELP ');
- textcolor(lightgray);
- write ('Ver2.03 ' );
- textcolor(white);
- write ('M');
- textcolor(lightgray);
- write ('agnum ');
- textcolor(white);
- write ('C');
- textcolor(lightgray);
- write ('ustom ');
- textcolor(white);
- write ('S');
- textcolor(lightgray);
- writeln('oftware');
- writeln;
- command := getcmd;
- if command = '' then
- begin
- writeln(' Help available for DOS commands:' );
- writeln(' ASSIGN DIR IF SET');
- writeln(' BACKUP DISKCOMP MKDIR SHELL');
- writeln(' BREAK DISKCOPY MODE SHIFT');
- writeln(' BUFFERS ECHO MORE SORT');
- writeln(' CHDIR ERASE PATH SYS');
- writeln(' CHKDSK EXE2BIN PAUSE TIME');
- writeln(' CLS FDISK PRINT TREE');
- writeln(' COMP FILES PROMPT TYPE');
- writeln(' COPY FIND RECOVER VER');
- writeln(' CTTY FOR REM[REMARK] VERIFY');
- writeln(' DATE FORMAT REN[RENAME] VOL');
- writeln(' DEL GOTO RESTORE');
- writeln(' DEVICE GRAPHICS RMDIR');
- writeln;
- writeln(' Extended help available for :' );
- writeln(' /GENERAL /DEBUG /EXT /FKEYS');
- writeln(' /BATCH /DIR /FILTER /DEV');
- writeln(' /CONFIG /EDLIN /KEYS /LINK');
- inline($CD/$20);
- end
- else
- begin
- for i:=1 to length(command) do command[i]:=upcase(command[i]);
- x:=wherex;
- y:=wherey;
- if command[1] <> '/' then
- begin
- if command = 'ASSIGN' then write(' ASSIGN [[x=y ]...]');
- if command = 'BACKUP' then write(' BACKUP [d:][pathname][filespec] d:[/S][/M][/A][/D:mm-dd-yy]');
- if command = 'BREAK' then write(' BREAK [ON|OFF]');
- if command = 'BUFFERS'then write(' BUFFERS =xx');
- if command = 'CHDIR' then write(' CHDIR [[d:]pathname] or CD [[d:]pathname]');
- if command = 'CHKDSK' then write(' CHKDSK [d:][filespec][/F][/V]');
- if command = 'CLS' then write(' CLS');
- if command = 'COMP' then write(' COMP [d:][pathname][dilespec] [d:][pathname][filespec]');
- if command = 'COPY' then begin
- write(' COPY [/A][/B][d:][pathname][source filespec]',
- crlf, ' [/A][/B][d:][pathname][destination filespec][/A][/B][/V]',
- crlf, ' or',
- crlf, ' COPY [/A][/B][d:][pathname][source filespec][/A][/B]',
- crlf, ' [+[d:][pathname]source filespec[/A][/B]...]',
- crlf, ' [d:][pathname][destination filespec][/A][/B][/V]');
- end;
- if command = 'CTTY' then write(' CTTY device');
- if command = 'DATE' then write(' DATE [mm-dd-yy]');
- if command = 'DEL' then write(' DEL [d:][pathname][filespec]');
- if command = 'DEVICE' then write(' DEVICE =[d:][pathname][filespec]');
- if command = 'DIR' then write(' DIR [d:][pathname][filespec][/P][/W]');
- if command = 'DISKCOMP' then write(' DISKCOMP');
- if command = 'DISKCOPY' then write(' DISKCOPY');
- if command = 'ECHO' then write(' ECHO');
- if command = 'ERASE' then write(' ERASE');
- if command = 'EXE2BIN' then write(' EXE2BIN');
- if command = 'FDISK' then write(' FDISK');
- if command = 'FIND' then write(' FIND [/V][/C][/N]"string"[ [d:][pathname][filespec]...]');
- if command = 'FOR' then write(' FOR %%c IN(set) DO command');
- if command = 'FORMAT' then write(' FORMAT [d:][/S][/1][/8][/V][/B]');
- if command = 'GOTO' then write(' GOTO label');
- if command = 'GRAPHICS' then write(' GRAPHICS');
- if command = 'IF' then write(' IF [NOT] condition_command');
- if command = 'MKDIR' then write(' MKDIR [:d]pathname',crlf,
- ' or',crlf,
- ' MD [:d]pathname');
- if command = 'MODE' then write(' MODE LPT#:[n][,[m][,p]]');
- if command = 'MORE' then write(' MORE');
- if command = 'PATH' then write(' PATH [d:]pathname[[;[d:]pathname]...]');
- if command = 'PAUSE' then write(' PAUSE [comment]');
- if command = 'PRINT' then write(' PRINT [d:][filespec][/T][/C][/P][...]');
- if command = 'PROMPT' then write(' PROMPT [prompt_text]');
- if command = 'RECOVER' then write(' RECOVER d:[pathname][filespec]');
- if (command = 'REM') or (command = 'REMARK')
- then write(' REM [comment]');
- if (command = 'REN') or (command = 'RENAME')
- then write(' REN [d:][pathname]filespec filespec',crlf,
- ' or',crlf,
- ' RENAME [d:][pathname]filespec filespec');
- if command = 'RESTORE' then write(' RESTORE d: [d:][pathname][filespec][/S][/P]');
- if command = 'RMDIR' then write(' RMDIR [d:]pathname');
- if command = 'SET' then write(' SET [string1=[string2]]');
- if command = 'SHELL' then write(' SHELL =[d:][pathname]filespec');
- if command = 'SHIFT' then write(' SHIFT');
- if command = 'SORT' then write(' SORT [/R][/+n][filespec]');
- if command = 'SYS' then write(' SYS d:');
- if command = 'TIME' then write(' TIME [hh:mm[:ss[.cc]]]');
- if command = 'TREE' then write(' TREE [d:][/F]');
- if command = 'TYPE' then write(' TYPE [d:][pathname]filespec');
- if command = 'VER' then write(' VER');
- if command = 'VERIFY' then write(' VERIFY [ON|OFF]');
- if command = 'VOL' then write(' VOL [d:]');
- end
- else
- begin
- if command = '/GENERAL' then write(' GENERAL INFORMATION :',
- crlf,crlf, ' |[broken bar] Used with an MS-DOS filter, indicates a pipe.',
- crlf, ' >[greater than] Redirects output to a file.',
- crlf, ' >> Redirects output and adds it to an existing file.',
- crlf, ' <[less than] Redirects input from a file.',
- crlf, ' *[wildcard] Used for any number of chars in a filename or ext.',
- crlf, ' ?[question mark] Used for any single char in a file spec.',
- crlf,crlf, ' FILESPEC CHARS A-Z[upper or lower case]',
- crlf, ' 0-9',
- crlf, ' $ ( ) & , - @',
- crlf, ' # { } % ~ ! _');
- if command = '/BATCH' then write(' BATCH PROCESSING COMMANDS :',
- crlf,crlf, ' ECHO ECHO [ON|OFF|message]',
- crlf, ' FOR FOR %%c IN(set) DO command',
- crlf, ' GOTO GOTO label',
- crlf, ' IF IF [NOT] condition_command',
- crlf, ' PAUSE PAUSE [comment]',
- crlf, ' REMARK REM [comment]',
- crlf, ' SHIFT SHIFT',
- crlf, ' Parameters [%0 thru %9]');
- if command = '/CONFIG' then write(' CONFIGURATION COMMANDS :',
- crlf,crlf, ' ANSI.SYS Device driver to change display options',
- crlf, ' BREAK BREAK ON|OFF',
- crlf, ' BUFFERS BUFFERS =xx',
- crlf, ' DEVICE DEVICE =[d:][pathname]filespec',
- crlf, ' FILES FILES =xx',
- crlf, ' SHELL SHELL =[d:][pathname]filespec');
- if command = '/DEBUG' then write(' DEBUG COMMANDS :',
- crlf,crlf, ' ASSEMBLE A [address]',
- crlf, ' COMPARE C range address',
- crlf, ' DUMP D [address [L value]] or D [range]',
- crlf, ' ENTER E address [list]',
- crlf, ' FILL F range list',
- crlf, ' GO G [=address] [address [address]]',
- crlf, ' HEX H value value',
- crlf, ' INPUT I address',
- crlf, ' LOAD L [address [d sector sector]',
- crlf, ' MOVE M range address',
- crlf, ' NAME N filespec [filespec][...]',
- crlf, ' OUTPUT O address byte',
- crlf, ' QUIT Q',
- crlf, ' REGISTER R [register_name]',
- crlf, ' SEARCH S range list',
- crlf, ' TRACE T [=address] [value]',
- crlf, ' UNASSEMBLE U [address] [l value] or U [range]',
- crlf, ' WRITE W [address [d sector sector]]');
- if command = '/DIR' then write(' DIRECTORY COMMANDS :',
- crlf,crlf, ' CHDIR CHDIR [d:][pathname]',
- crlf, ' DIR DIR [d:][pathname][filespec][/P][/W]',
- crlf, ' MKDIR MKDIR [d:][pathname]',
- crlf, ' or',
- crlf, ' MD [d:][pathname]',
- crlf, ' RMDIR RMDIR [d:][pathname]',
- crlf, ' or',
- crlf, ' RM [d:][pathname]',
- crlf, ' TREE TREE [d:][/F]');
- if command = '/EDLIN' then write(' EDLIN COMMANDS :',
- crlf,crlf, ' APPEND [n] A',
- crlf, ' COPY [line],[line],line [,count]C',
- crlf, ' DELETE [line][,line] D',
- crlf, ' EDIT [line]',
- crlf, ' END[EXIT] E',
- crlf, ' INSERT [line] I',
- crlf, ' LIST [line][,line] L',
- crlf, ' MOVE [line],[line],line M',
- crlf, ' PAGE [line][,line] P',
- crlf, ' QUIT Q',
- crlf, ' REPLACE [line][,line][?] R[string1[^Zstring2]',
- crlf, ' SEARCH [line][,line][?] Sstring',
- crlf, ' TRANSFER [line] tfilespec',
- crlf, ' WRITE [n] W');
- if command = '/EXT' then write(' FILE SPECIFICATION EXTENSIONS :',
- crlf,crlf, ' .BAK Back-up file',
- crlf, ' .BAT Batch file',
- crlf, ' .BIN Default file extension (EXE2BIN)',
- crlf, ' .COM Command program (EXE2BIN)',
- crlf, ' .EXE Run (executable) file (MS-LINK, required)',
- crlf, ' .MAP List file (MS-LINK, optional)',
- crlf, ' .OBJ Object file (MS-LINK)',
- crlf, ' .LIB Library file (MS-LINK)',
- crlf,crlf, ' .PAS Pascal source file',
- crlf, ' .BAS Basic source file',
- crlf, ' .TXT Text file (ASCII)',
- crlf, ' .DAT Data file (binary or ASCII)',
- crlf, ' .SRC Misc. source file');
- if command = '/FILTER' then write(' FILTER COMMANDS :',
- crlf,crlf, ' FIND FIND [/V][/C][/N]"string"[ [d:][pathname] filespec]...]',
- crlf, ' MORE MORE',
- crlf, ' SORT SORT [/R][/+n][filespec]');
- if command = '/KEYS' then write(' CONTROL KEY AND MULTIPLE-KEY FUNCTIONS :',
- crlf,crlf, ' CTRL(^) Represented by a caret(^). Used with other keys.',
- crlf, ' Some CTRL key functions are listed below.',
- crlf, ' ^ALT+DEL Resets the system to the MS-DOS command level.',
- crlf, ' ^BREAK Aborts current command.',
- crlf, ' ^NUM_LOCK Temporarily suspends output to the screen (as when',
- crlf, ' a file is being displayed). To continue, press any key.',
- crlf, ' ^PRTSC Activates the printer. Prints lines as they are entered.',
- crlf, ' Press ^PRTSC again to deactivate.',
- crlf, ' SHIFT+PRTSC Each time they are pressed, causes the printer to print',
- crlf, ' a hard copy of everything displayed on the screen.');
- if command = '/FKEYS' then write(' SPECIAL FUNCTION KEYS :',
- crlf,crlf, ' F1(Copy 1) Copies one character from the template to the input',
- crlf, ' buffer line. Functions like the CURSOR-RIGHT key.',
- crlf, ' F2(Copy To) Copies all characters up to the specified character',
- crlf, ' from the template to the input buffer line.',
- crlf, ' F3(Copy All) Copies all characters from the template to the input',
- crlf, ' buffer line.',
- crlf, ' DEL(Skip 1) Skips over (deletes) the first character in the template',
- crlf, ' line. Press F3 to see the results and copy the remainder',
- crlf, ' of the line.',
- crlf, ' F4(Skip To) Skips over characters in the template up to the specified',
- crlf, ' character. Press F3 to see the results and copy the',
- crlf, ' remainder of the line.',
- crlf, ' ESC(Skip All) Voids the current input buffer line, leaving the',
- crlf, ' template unchanged.',
- crlf, ' INS(Add In) Turns the insert mode on. Allows characters to be insert-',
- crlf, ' ed into a line. Pressing enter cancels the insert mode.',
- crlf, ' F5(New Temp) Moves the cursor down one line, and makes this line',
- crlf, ' the new template for further editing.',
- crlf, ' F6(^Z) Ends the insert mode.',
- crlf, ' F7 thru F10 have no assigned function.');
- if command = '/DEV' then write(' RESERVED DEVICE NAMES :',
- crlf,crlf, ' AUX: or COM1: Primary asynchronous communications adapter port.',
- crlf, ' COM2: Secondary asynchronous communications adapter port.',
- crlf, ' CON: Keyboard input and screen output.',
- crlf, ' PRN: or LPT1: Line printer (output device only).',
- crlf, ' LPT2: or LPT3: Additional line printers (output device only).');
- if command = '/LINK' then write(' MS-LINK INFORMATION :',
- crlf,crlf, ' Command Charaters :',
- crlf, ' +(plus sign) Separates object modules to be linked.',
- crlf, ' or blank space',
- crlf, ' ;(semicolon) Selects default responses to prompts after the',
- crlf, ' first prompt.',
- crlf, ' ^BREAK Aborts link session at any time.',
- crlf, ' /(slash) Designates a switch.',
- crlf,crlf, ' Command Prompts : Libraries[.LIB]',
- crlf, ' List File [NUL.MAP]',
- crlf, ' Object Modules [.OBJ]',
- crlf, ' Run File [object_file.EXE]',
- crlf, ' Temporary Output File [VM.TMP]',
- crlf,crlf, ' Switches : /DSALLOCATE /HIGH',
- crlf, ' /LINENUMBERS /MAP',
- crlf, ' /PAUSE /STACK');
- end;
- if (x = wherex) and (y = wherey) then
- writeln(' Help for ', command ,' not found')
- else writeln;
- inline($CD/$20); { terminate the program }
- end;
- end.
-
-
-
-